home *** CD-ROM | disk | FTP | other *** search
- MINVAL(3I) Last changed: 4-13-99
-
-
- NNAAMMEE
- MMIINNVVAALL - Returns the minimum value in an array
-
- SSYYNNOOPPSSIISS
- MMIINNVVAALL (([AARRRRAAYY==]_a_r_r_a_y [,,[DDIIMM==]_d_i_m] [,,[MMAASSKK==]_m_a_s_k]))
-
- IIMMPPLLEEMMEENNTTAATTIIOONN
- UNICOS, UNICOS/mk, IRIX systems
-
- CF90, MIPSpro 7 Fortran 90
-
- SSTTAANNDDAARRDDSS
- Fortran
-
- DDEESSCCRRIIPPTTIIOONN
- The MMIINNVVAALL intrinsic function can be used for array reduction. It
- returns the minimum value of the elements of _a_r_r_a_y along dimension _d_i_m
- corresponding to the true elements of _m_a_s_k. It accepts the following
- arguments:
-
- _a_r_r_a_y Must be of type integer or real. It must not be scalar.
-
- _d_i_m Must be a scalar integer value in the range 1 <= _d_i_m <= _n,
- where _n is the rank of _a_r_r_a_y. The corresponding actual
- argument must not be an optional dummy argument.
-
- _m_a_s_k Must be of type logical and must be conformable with _a_r_r_a_y.
-
- MMIINNVVAALL is a transformational intrinsic function. The name of this
- intrinsic cannot be passed as an argument.
-
- NNOOTTEESS
- On UNICOS systems, both execution speed and the number of bits used in
- mathematical operations are affected when compiling with
- ff9900 --OO ffaassttiinntt, which is the default setting. For more information,
- see _C_F_9_0 _C_o_m_m_a_n_d_s _a_n_d _D_i_r_e_c_t_i_v_e_s _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l.
-
- RREETTUURRNN VVAALLUUEESS
- The result is of the same type as _a_r_r_a_y. It is scalar if _d_i_m is
- absent or _a_r_r_a_y has rank one. Otherwise, the result is an array of
- rank _n-1 and of shape
- (_d , _d , ..., _d , _d , ..., _d ),
- 1 2 _d_i_m-1 _d_i_m+1 _n
- where (_d , _d , ..., _d )
- 1 2 _n
- is the shape of _a_r_r_a_y.
-
- The result of MMIINNVVAALL((_a_r_r_a_y)) has a value equal to the minimum value of
- all the elements of _a_r_r_a_y or has the value of the positive number of
- the largest magnitude supported for numbers of the data type of _a_r_r_a_y
- if _a_r_r_a_y is a zero-sized array.
-
- The result of MMIINNVVAALL((_a_r_r_a_y,,MMAASSKK==_m_a_s_k)) has a value equal to the minimum
- value of all the elements of _a_r_r_a_y corresponding to true elements of
- _m_a_s_k or has the value of the positive number of the largest magnitude
- supported for numbers of the data type of _a_r_r_a_y if there are no true
- elements.
-
- If _a_r_r_a_y has rank one, MMIINNVVAALL((_a_r_r_a_y,,_d_i_m[,,_m_a_s_k])) has a value equal to
- that of MMIINNVVAALL((_a_r_r_a_y[,,MMAASSKK==mask])). Otherwise, the value of element
- (_s , _s , ..., _s , _s , ..., _s )
- 1 2 _d_i_m-1 _d_i_m+1 _n
- of MMIINNVVAALL((_a_r_r_a_y,,_d_i_m[,,_m_a_s_k])) is equal to
- MMIINNVVAALL((_a_r_r_a_y(_s , _s , ..., _s , : , _s , ..., _s ),
- 1 2 _d_i_m-1 _d_i_m+1 _n
- [,, MMAASSKK==_m_a_s_k((_s , _s , ..., _s , : , _s , ..., _s )]).
- 1 2 _d_i_m-1 _d_i_m+1 _n
-
- On UNICOS and UNICOS/mk systems, MMIINNVVAALL returns the value of
- ++HHUUGGEE((_a_r_r_a_y)) for all zero-sized arrays. On IRIX systems, MMIINNVVAALL
- returns the value of ++IINNFFIINNIITTYY for real, zero-sized arrays. A request
- for interpretation of the Fortran 95 standard may change one of these
- return values for a real array in a future release.
-
- EEXXAAMMPPLLEESS
- Example 1: The value of MMIINNVVAALL(( ((// 11,, 22,, 33 //)) )) is 1.
-
- Example 2: Assume that C is the array [10,-100,10]. Then
- MMIINNVVAALL((CC,, MMAASSKK==CC ..LLTT.. 00)) finds the minimum of the negative elements of
- C (which is -100) and MMIINNVVAALL((CC,, MMAASSKK==CC ..GGTT.. 1100)) returns the largest
- possible integer because there are no true elements using the mask.
-
- Example 3: Assume that BB is the following array:
-
- | 1 3 5 |
-
- | 2 4 6 |
-
- The following are true:
-
- MMIINNVVAALL((BB,, DDIIMM==11)) is [1, 3, 5]
-
- MMIINNVVAALL((BB,, DDIIMM==22)) is [1, 2]
-
- MMIINNVVAALL((BB)) is 1
-
- Example 4: Assume that NN is the following array:
-
- | 0 1 2 3 |
-
- | 4 5 6 7 |
-
- | 8 9 0 1 |
-
- In an array section reference, the following are true:
-
- MMIINNVVAALL((NN((22::33,,22::44)),,MMAASSKK==NN((22::33,,22::44))..NNEE..00)) is 1
-
- MMIINNVVAALL((NN((22::33,,22::44)),,DDIIMM==11,,NN((22::33,,22::44))..NNEE..00)) is [5, 6, 1]
-
- MMIINNVVAALL((NN((22::33,,22::44)),,DDIIMM==22,,NN((22::33,,22::44))..NNEE..00)) is [5, 1]
-
- SSEEEE AALLSSOO
- _I_n_t_r_i_n_s_i_c _P_r_o_c_e_d_u_r_e_s _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l for the printed version of this
- man page.
-